Skip to content

Conversation

@NoaHimesaka1873
Copy link
Contributor

No description provided.

@NoaHimesaka1873 NoaHimesaka1873 marked this pull request as draft May 1, 2025 15:44
@NoaHimesaka1873 NoaHimesaka1873 marked this pull request as ready for review May 2, 2025 15:03
@Eeems
Copy link
Member

Eeems commented Oct 26, 2025

@NoaHimesaka1873 there are merge conflicts, could you resolve them?

To further help things, could you add a test that just compiles a very simple hello world c program as part of creating the package, and then ensure that it creates an executable with the correct architecture after doing a build? This would be the test I would be doing manually otherwise. I'm guessing this is still waiting on toltec-dev/toolchain#41 though?

@NoaHimesaka1873
Copy link
Contributor Author

Yeah I could make one, though it would need v4 to be merged first.

@Eeems
Copy link
Member

Eeems commented Oct 27, 2025

You would be able to do the test locally by downloading the v4 images from the v4 PR pipeline before they are removed, but yes, it would require it being merged before this can be fully tested.

@Eeems Eeems linked an issue Oct 27, 2025 that may be closed by this pull request
@Eeems
Copy link
Member

Eeems commented Oct 27, 2025

While testing toltec-dev/toolchain#41 I was using the following recipe for testing:

#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(arm aarch64)
pkgnames=(hello)
pkgdesc="Hello world"
url=https://toltec-dev.org
pkgver=0.0.0-1
timestamp=2025-10-27T18:32:23Z
section=utils
maintainer="Nathaniel van Diepen <[email protected]>"
license=MIT
image=toolchain:v4.0
source=(hello.c)
sha256sums=(SKIP)
flags=(nostrip)

build() {
    source /opt/x-tools/switch-$arch.sh
    ${CROSS_COMPILE}gcc hello.c -o hello
    ${CROSS_COMPILE}strip hello
}

package() {
    install -D -m 755 "$srcdir"/hello "$pkgdir"/opt/bin/hello
}

With the following source file:

#include <stdio.h>

int main(){
   printf("Hello, World!");
   return 0;
}

This would need to be update to use the correct archs etc.

Now that I'm playing with this and looked at #57 I'm realizing that there is still an issue that will make implementing this in the actual repo difficult. There is no way to specify a different image per arch, and since v4.0 is not compatible with the current supported 3.x images that rmallos3, rm1os3, and rm2os3 target, this means that you can't target them at the same time as rmppos3 for packages that need to compile anything. The options I see for merging this are:

  1. Add mechanism to change image based on arch.
  2. Create new arch set for things built with v4+ images. rmallos3v18 or something similar, and we'll have to work on creating duplicate package recopies for packages as we implement the new OS support.

@Eeems
Copy link
Member

Eeems commented Oct 27, 2025

Please also add rmppm, even though it'll be the same as rmpp, but it allow for packages to target just one specifically. Although this means we'll need a rmall equivalent for just rmpp and rmppm. It may make sense to have a rmarm and rmaarch?

@NoaHimesaka1873
Copy link
Contributor Author

Wrote test case!

@NoaHimesaka1873 NoaHimesaka1873 requested a review from Eeems October 28, 2025 04:42
@Eeems
Copy link
Member

Eeems commented Oct 28, 2025

You'll want to run make format-fix and then resolve any make lint errors.

@NoaHimesaka1873
Copy link
Contributor Author

builder.py line 333 still remains over 80 characters, gotta fix manually...

@NoaHimesaka1873
Copy link
Contributor Author

I chose more variables over super long lines.

@NoaHimesaka1873
Copy link
Contributor Author

Urgh, should be now actually fixed

@Eeems
Copy link
Member

Eeems commented Oct 28, 2025

I'll merge this tomorrow, but I'm not going to tag 0.4 yet, I've got to sort out the concern I raised at the bottom of #58 (comment)

I'd really like to allow custom images per arch. I may also implement #43

@Eeems Eeems self-requested a review October 28, 2025 23:53
@Eeems Eeems merged commit 644d204 into toltec-dev:main Oct 29, 2025
14 checks passed
@Eeems
Copy link
Member

Eeems commented Oct 29, 2025

Upon reviewing the code, my concern about different image per arch not being possible is not true, you can specify image_rmpp= to use a specific build image for the rmpp package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiarch support

2 participants